hackerrank ruby enumerable each with index problem

join shbcf.ru